package org.oslims.domain;

import java.util.Date;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.google.gwt.validation.client.*;

@Entity
@DiscriminatorValue("SOP")
public class SOP extends File {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1265039748360702595L;

	private Date validFrom;
	
	private Date validTill;
	
	@NotEmpty
	private String code;
	
	@ManyToOne
	@JoinColumn(name="OWNER_FK")
	@NotNull
	private LabStaff owner;
	
	@NotNull
	private Boolean active = true;
	
	@ManyToOne
	@JoinColumn(name="ANALYSIS_FK")
	@NotNull
	private Analysis analysis;
	
	public Date getValidFrom() {
		return validFrom;
	}
	public void setValidFrom(Date validFrom) {
		this.validFrom = validFrom;
	}
	public Date getValidTill() {
		return validTill;
	}
	public void setValidTill(Date validTill) {
		this.validTill = validTill;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public LabStaff getOwner() {
		return owner;
	}
	public void setOwner(LabStaff owner) {
		this.owner = owner;
	}
	public Boolean getActive() {
		return active;
	}
	public void setActive(Boolean active) {
		this.active = active;
	}
	public Analysis getAnalysis() {
		return analysis;
	}
	public void setAnalysis(Analysis analysis) {
		this.analysis = analysis;
	}
	
	
}
